package com.z.platform.controller.persistence.orm.metadataModel;

import java.util.List;

/**
 * @author haonan.zhang
 */
public class TableMetadata {
    /**
     * 表名
     */
    private String tableName;

    /**
     * 主键信息
     */
    private ColumnMetadata primaryKey;

    /**
     * 主键外所有列信息
     */
    private List<ColumnMetadata> allColumnMetadata;


    public TableMetadata() {
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public ColumnMetadata getPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(ColumnMetadata primaryKey) {
        this.primaryKey = primaryKey;
    }

    public List<ColumnMetadata> getAllColumnMetadata() {
        return allColumnMetadata;
    }

    public void setAllColumnMetadata(List<ColumnMetadata> allColumnMetadata) {
        this.allColumnMetadata = allColumnMetadata;
    }

    public void setColumnMetadata(ColumnMetadata columnMetadata) {
        this.allColumnMetadata.add(columnMetadata);
    }

}
